<?php
//dezend by http://www.yunlu99.com/ QQ:270656184
defined('BASEPATH') || exit('No direct script access allowed');
?><!DOCTYPE html>
	<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
 	<link rel="shortcut icon" href="favicon.ico">
	<link rel="stylesheet" href="/static/css/animate.css">
	<link rel="stylesheet" href="/static/plugin/jquery-ui/jquery-ui.min.css" />
	<link rel="stylesheet" href="/static/plugin/font-awesome/css/font-awesome.min.css" />
	<link rel="stylesheet" href="/static/css/style.css">
	<link rel="stylesheet" href="/static/css/user.css">
	<script src="/static/js/jquery-1.10.2.min.js"></script>
	
	<script src="/static/plugin/jquery-ui/jquery-ui.min.js"></script>
	<script src="/static/plugin/layer/layer.js"></script>
	<script src="/static/js/jquery.form.min.js"></script>
	<script src="/static/js/jquery.cookie.js"></script>
	<script src="/static/js/extend.js"></script>
	</head>
	
	<body>
	<div class="form">
		<div class="form-notice"></div>
	        <form id="form_id" action="<?php echo site_url('push/trade');?>" method="post">
	        	<input type="hidden" name="id" value="<?php echo $id;?>">
	        	<input type="hidden" name="coin_id" value="<?php echo $coin_id;?>">
	        	<input type="hidden" name="price_coin_id" value="<?php echo $price_coin_id;?>">
				<table>
				<tr>
			    <th width=70>单价</th>
			    <td><input type="text" name="price" value="<?php echo $price;?>" disabled></td>
			    <td width=70></td>
				</tr>
				
				<tr>
			    <th>数量</th>
			    <td><input type="text" name="amount" value="<?php echo $amount;?>" must="1"><p>请输入数量</p></td>
				</tr>
				
				<tr>
			    <th>总金额</th>
			    <td><input type="text" name="total" value="<?php echo $total;?>" disabled></td>
				</tr>
				<tr>
				
			    <th>安全密码</th>
			    <td><input type="password" name="paypwd" must="1"><p>请输入安全密码</p></td>
				</tr>
				
				<tr><th></th><td class="warning"></td></tr>
				<tr>
				<th></th><td><button type="submit"><?php echo lang('user_submit');?></button></td>
				</tr>
			  </table>
			</form>
	</div>
</body>
</html>
<script>
$(function(){
	$('#form_id').winForm();
	$('[name="amount"],[name="price"]').bind('change keyup',function(d){
		var amount = $('[name="amount"]').val();
		var price = $('[name="price"]').val();
		$('[name="total"]').val(Number(amount)*Number(price));
	});
});
</script>